import {mock} from "mockjs";
import {loginInfo,loginInterface} from "@/mock/api/url/login";
let data = mock({
    "date": [
        {
            "name": "周日也满目见",
            "id": "630000197305285641",
            "code": "Helen",
            "children": [
                {
                    "name": "国别白都",
                    "id": "990000198505141673",
                    "code": "David"
                },
                {
                    "name": "计况特可例世",
                    "id": "500000199611151123",
                    "code": "Deborah"
                },
                {
                    "name": "所论不两",
                    "id": "350000199101106033",
                    "code": "Sandra"
                },
                {
                    "name": "了我复处江于",
                    "id": "310000200308229354",
                    "code": "Maria"
                },
                {
                    "name": "算王传几队",
                    "id": "810000199802193257",
                    "code": "George"
                }
            ]
        },
    ]
})
 const getResponseData = (data: any, code = 200, msg: null | string = null) => {
    return {
        code: code,
        msg: msg,
        data,
    }
}
export default [
    {
        url: loginInfo.url,
        method: loginInfo.method,
        response: (response:any) => {
            let {username, password}: loginInterface = response.body
            return getResponseData(data)

        },
    },
]